F_Bloom f_bloom; //<>// //<>//
//boolean bloomFacet = false; // set to false
//boolean setupBloomFacet=true;

class F_Bloom 
{
  boolean isActive=false;
  float ang;
  int curr;
  PImage FFrame[];
  boolean loaded;
  int imgCount;
  float foRot;
  String iString;

  F_Bloom() {
    curr=0;
    imgCount=61;
    foRot=0;
  }
  void setupFO() {
    FFrame = new PImage[imgCount];
    //    setupBloomFacet=false;
    imageMode(CENTER);
    if (androidMode) {
      iString = "//mnt//sdcard//sakura//fBloom//bloom4_";
    } else {
      iString = "/mnt/sdcard/sakura/fBloom/bloom4_";
    }
    isActive=true;
    drawFO();
  }
  void restartFO(){
    curr=0;
    drawFO();
  }
  void drawFO() { //! this sketch is non-looping, one sequence draw
    frameRate(12);
    background(0);
    foRot = oscRot;
    pushMatrix();
    translate(width/2, height/2);
    rotate(radians(foRot));
    if (curr<imgCount) {
      FFrame[curr] = loadImage(iString+nf(curr, 2)+".png"); //
      image(FFrame[curr], 0, 0, height, height);
      popMatrix();
      if (!androidMode) {
        OverlayStage();
      }
      curr++;
    } else {
      image(FFrame[imgCount-1], 0, 0, width, width);
      popMatrix();
    }
    if (curr == imgCount) {
      //      bloomFacet=false;
      isActive=false;
      FacetAct=false;
      curr = 0;
    }
  }
}
